import service from '@/utils/request'
// @Tags Store
// @Summary 创建店铺
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.Store true "创建店铺"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /store/createStore [post]
export const createStore = (data) => {
  return service({
    url: '/store/createStore',
    method: 'post',
    data,
  })
}

// @Tags Store
// @Summary 删除店铺
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.Store true "删除店铺"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /store/deleteStore [delete]
export const deleteStore = (params) => {
  return service({
    url: '/store/deleteStore',
    method: 'delete',
    params,
  })
}

// @Tags Store
// @Summary 批量删除店铺
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除店铺"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /store/deleteStore [delete]
export const deleteStoreByIds = (params) => {
  return service({
    url: '/store/deleteStoreByIds',
    method: 'delete',
    params,
  })
}

// @Tags Store
// @Summary 更新店铺
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.Store true "更新店铺"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /store/updateStore [put]
export const updateStore = (data) => {
  return service({
    url: '/store/updateStore',
    method: 'put',
    data,
  })
}

// @Tags Store
// @Summary 用id查询店铺
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data query model.Store true "用id查询店铺"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /store/findStore [get]
export const findStore = (params) => {
  return service({
    url: '/store/findStore',
    method: 'get',
    params,
  })
}

// @Tags Store
// @Summary 分页获取店铺列表
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取店铺列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /store/getStoreList [get]
export const getStoreList = (params) => {
  return service({
    url: '/store/getStoreList',
    method: 'get',
    params,
  })
}
// @Tags Store
// @Summary 不需要鉴权的店铺接口
// @Accept application/json
// @Produce application/json
// @Param data query request.StoreSearch true "分页获取店铺列表"
// @Success 200 {object} response.Response{data=object,msg=string} "获取成功"
// @Router /store/getStorePublic [get]
export const getStorePublic = () => {
  return service({
    url: '/store/getStorePublic',
    method: 'get',
  })
}

export function B端店铺初次审核通过店铺(data) {
  return service({
    url: '/store/B端店铺初次审核通过店铺',
    method: 'post',
    data,
  })
}
